// 初始化表格数据
export const noticeTableColumn = [
  {
    type: 'index',
    label: '序号',
    width: '80',
  },
  {
    prop: 'toCompanyName',
    label: '企业名称',
    minWidth: '200',
    'show-overflow-tooltip': true,
  },
  {
    prop: 'noticeType',
    label: '通知类型',
    width: '100',
    formatter: (row) => {
      return noticeTypes[row.noticeType]
    },
  },
  {
    prop: 'transactionalType',
    label: '事务类型',
    width: '200',
    formatter: (row) => {
      return transactionalTypes[row.transactionalType]
    },
  },
  {
    prop: 'receiveName',
    label: '接收人',
    minWidth: '120',
  },
  {
    prop: 'receiveNumber',
    label: '手机号',
    width: '130',
  },
  {
    prop: 'startAt',
    label: '时间范围',
    width: '150',
    formatter: (row) => {
      return row.startAt + '-' + row.endAt
    },
  },
  {
    prop: 'status',
    label: '状态',
    width: '100',
    formatter: (row) => {
      return statusTypes[row.status]
    },
  },
  {
    prop: 'updatedAt',
    label: '操作时间',
    width: '150',
  },
  {
    prop: 'updatedBy',
    label: '操作人',
    minWidth: '120',
  },
  {
    prop: 'operation',
    label: '操作',
    width: '170',
    fixed: 'right',
  },
]
// 历史消息基础表格数据
export const baseHistoryColumn = [
  {
    prop: 'toCompanyName',
    label: '企业名称',
    minWidth: '300',
    'show-overflow-tooltip': true,
  },
  {
    prop: 'noticeType',
    label: '通知类型',
    width: '180',
    formatter: (row) => {
      return noticeTypes[row.noticeType]
    },
  },
  {
    prop: 'transactionalType',
    label: '事务类型',
    minWidth: '180',
    formatter: (row) => {
      return transactionalTypes[row.transactionalType]
    },
  },
  {
    prop: 'receiveName',
    label: '接收人',
    minWidth: '180',
  },
  {
    prop: 'receiveNumber',
    label: '手机号',
    width: '160',
  },
  {
    prop: 'status',
    label: '状态',
    width: '120',
    formatter: (row) => {
      return statusTypes[row.status]
    },
  },
]
// 历史消息表格数据
export const historyTableColumn = [
  {
    type: 'index',
    label: '序号',
    width: '80',
  },
  {
    prop: 'sendTime',
    label: '通知时间',
    width: '200',
  },
  {
    prop: 'messageContent',
    label: '通知内容',
    minWidth: '400',
  },
]
// 事务类型
export const transactionalTypeOption = [
  {label: '物料未对照', value: 1},
  {label: '订单接收失败', value: 2},
  {label: '证照过期', value: 3},
  {label: '新国科订单通知', value: 4},
]
export const transactionalTypes = {
  1: '物料未对照',
  2: '订单接收失败',
  3: '证照过期',
  4: '新国科订单通知',
}
// 通知类型
export const noticeTypeOption = [
  {label: '短信', value: 1},
  // {label: '公众号', value: 2}
]
export const noticeTypes = {
  1: '短信',
  2: '公众号',
}
// 通知类型
export const statusOption = [
  {label: '停用', value: 0},
  {label: '启用', value: 1},
]
export const statusTypes = {
  1: '启用',
  0: '停用',
}
